import { Abnormal, CloseWifi, DisabaledWeb, ErrorComputer, Forbid } from '@icon-park/vue-next';
import { markRaw } from 'vue';

const errorPage = () => import('@/views/abnormal/error/index.vue');
const error500 = () => import('@/views/abnormal/error_500/index.vue');
const error404 = () => import('@/views/abnormal/error_404/index.vue');
const error403 = () => import('@/views/abnormal/error_403/index.vue');

const pages = {
  path: '/abnormal',
  name: 'abnormal',
  redirect: '/abnormal/error',
  meta: {
    icon: markRaw(Abnormal),
    title: '异常页'
  },
  children: [
    {
      path: 'error',
      name: 'abnormal_error',
      meta: {
        icon: markRaw(ErrorComputer),
        title: '错误页'
      },
      component: errorPage
    },
    {
      path: '404',
      name: 'abnormal_404',
      meta: {
        icon: markRaw(DisabaledWeb),
        title: '404'
      },
      component: error404
    },
    {
      path: '403',
      name: 'abnormal_403',
      meta: {
        icon: markRaw(Forbid),
        title: '403'
      },
      component: error403
    },
    {
      path: '500',
      name: 'abnormal_500',
      meta: {
        icon: markRaw(CloseWifi),
        title: '500'
      },
      component: error500
    }
  ]
};
export default pages;
